<template>
  <div class="layout-page">
    <router-view></router-view>
    <!-- <van-tabbar route fixed>
      <van-tabbar-item to='/article' icon="wap-home-o">首页</van-tabbar-item>
      <van-tabbar-item to='/user' icon="user-o">我的</van-tabbar-item>
    </van-tabbar> -->

    <div class="tabbar">
      <van-tabbar route v-model="active">
        <van-tabbar-item to="/article">
        首页
        <template #icon={active}>
          <img :src="active ? require('@/icons/home-select.svg') : require('@/icons/home-moren.svg')" alt="">
        </template>
        </van-tabbar-item>
        <van-tabbar-item to="/user">
        我的
        <template #icon={active}>
          <img :src="active ? require('@/icons/user-select.svg') : require('@/icons/user-moren.svg')" alt="">
        </template>
        </van-tabbar-item>
      </van-tabbar>
    </div>
  </div>
</template>

<script>
export default {
  name: 'layout-page',
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style lang="less" scoped>

</style>
